package com.peas.platform.module.icims.base.mdm.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 机场
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_airport`")
public class AirportPo extends BasePo {

    // 机场类型
    // 枚举取值:AirportType
    @Comment(value = "机场类型", enumType = "AirportType")
    @NotBlank(message = "机场类型不能为空")
    @Size(max = 20, message = "机场类型不能超过20个字符")
    @TableField(value = "`airport_type`", jdbcType = JdbcType.VARCHAR)
    private String airportType;

    // 机场三字码
    @Comment(value = "机场三字码")
    @Size(max = 100, message = "机场三字码不能超过100个字符")
    @TableField(value = "`airport_code`", jdbcType = JdbcType.VARCHAR)
    private String airportCode;

    // 机场名称
    @Comment(value = "机场名称")
    @NotBlank(message = "机场名称不能为空")
    @Size(max = 200, message = "机场名称不能超过200个字符")
    @TableField(value = "`airport_name`", jdbcType = JdbcType.VARCHAR)
    private String airportName;

    // 城市ID
    // （行政区表）外键
    @Comment(value = "城市ID")
    @TableField(value = "`city_id`", jdbcType = JdbcType.BIGINT)
    private Long cityId;

    // ICAO代码
    @Comment(value = "ICAO代码")
    @Size(max = 20, message = "ICAO代码不能超过20个字符")
    @TableField(value = "`icao`", jdbcType = JdbcType.VARCHAR)
    private String icao;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 备注
    @Comment(value = "备注")
    @TableField(value = "`remark`", jdbcType = JdbcType.CLOB)
    private String remark;

}
